# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     utils
   Description :
   Author :       Flyoung
   date：          2023/3/5
-------------------------------------------------
   Change Activity:
                   2023/3/5:
-------------------------------------------------
"""
from typing import List


def unique(li: List):
    """
    稳定去重
    :param li:
    :return:
    """
    if len(li) > 0:
        res = []
        s = set()
        for it in li:
            if it not in s:
                res.append(it)
                s.add(it)
        return res
    else:
        return li
